import numpy as np
import pandas as pd

# 题1：将其中的`Nan`替换为所在列的均值
# 读取数据
movie = pd.read_csv('data/movie.csv')
# 替换所有缺失值
for i in movie.columns:
    if np.any(pd.isnull(movie[i])):
        movie[i].fillna(movie[i].mean(), inplace=True)
